]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
checkBox: Fix expand and align properties
authorJonas Dreßler <verdre@v0yd.nl>
Wed, 4 Dec 2019 20:37:34 +0000 (21:37 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Thu, 5 Dec 2019 15:35:22 +0000 (15:35 +0000)
In f2bd39b20c89c1896c124f1dccdd587aa544e45c, the expand property for
checkboxes was accidentally set to the grandchild (the StBin), instead
of the child (the StBoxLayout) of the StButton. Fix that and let the
BoxLayout expand instead of the Bin.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/885

js/ui/checkBox.js

index e122fda41edff6acec973b6ce70cecf3d75cfe91..183d719c8d13e0c407d070e2d8970569ce4ffd91 100644 (file)
@@ -4,7 +4,10 @@ const { Clutter, GObject, Pango, St } = imports.gi;
 var CheckBox = GObject.registerClass(
 class CheckBox extends St.Button {
     _init(label) {
-        let container = new St.BoxLayout();
+        let container = new St.BoxLayout({
+            x_expand: true,
+            y_expand: true,
+        });
         super._init({
             style_class: 'check-box',
             child: container,
@@ -13,11 +16,7 @@ class CheckBox extends St.Button {
             can_focus: true,
         });
 
-        this._box = new St.Bin({
-            x_expand: true,
-            y_expand: true,
-            y_align: Clutter.ActorAlign.START,
-        });
+        this._box = new St.Bin({ y_align: Clutter.ActorAlign.START });
         container.add_actor(this._box);
 
         this._label = new St.Label();